Extracting Reusable Funtions by Flow Graph-Based Program Slicing
نویسندگان
چکیده
An alternative approach to developing reusable components from scratch is to recover them from existing systems. In this paper, we apply program slicing, a program decomposition method, to the problem of extracting reusable functions from illstructured programs. As with conventional slicing first described by Weiser, a slice is obtained by iteratively solving data flow equations based on a program flow graph. We extend the definition of program slice to a transform slice, one that includes statements which contribute directly or indirectly to transform a set of input variables into a set of output variables. Unlike conventional program slicing, these statements do not include either the statements necessary to get input data or the statements which test the binding conditions of the function. Transform slicing presupposes the knowledge that a function is performed in the code and its partial specification, only in terms of input and output data. Using domain knowledge we discuss how to formulate expectations of the functions implemented in the code. In addition to the input/output parameters of the function, the slicing criterion depends on an initial statement, which is difficult to obtain for large programs. Using the notions of decomposition slice and concept validation we show how to produce a set of candidate functions, which are independent of line numbers but must be evaluated with respect to the expected behavior. Although human interaction is required, the limited size of candidate functions makes this task easier than looking for the last function instruction in the original source code.
منابع مشابه
A Slicing-based Approach to Extracting Reusable Software Architectures
An alternative approach to developing reusable components from scratch is to recover them from existing systems. Although numerous techniques have been proposed to recover reusable components from existing systems, most have focused on implementation code, rather than software architecture. In this paper, we apply architectural slicing to extract reusable architectural elements (i.e., component...
متن کاملExtracting Reusable Software Architectures: A Slicing-Based Approach
An alternative approach to developing reusable components from scratch is to recover them from existing systems. Although numerous techniques have been proposed to recover reusable components from existing systems, most have focused on implementation code, rather than software architecture. In this paper, we apply architectural slicing to extract reusable architectures from existing architectur...
متن کاملVariable Data-Flow Graph for Lightweight Program Slicing and Visualization
To understand the behavior of a program, developers often need to read source code fragments in various modules. Systemdependence-graph-based (SDG) program slicing is a good candidate for supporting the investigation of data-flow paths among modules, as SDG is capable of showing the data-dependence of focused program elements. However, this technique has two problems. First, constructing SDG re...
متن کاملA Program Slicer Using Def-Slice-Use Tables for Efficiently Slicing Both User-Defined and Library Functions
Program slicing is a technique for statically analyzing a program and extracting an executable sub-program, which is called a program slice, from the original program. This technique has been widely applied to program testing, debugging and maintenance. This paper presents a slicing method for extracting program slices from a program that calls library functions, which are provided as object co...
متن کاملSlicing Functional Programs by Calculation
Program slicing is a well known family of techniques used to identify code fragments which depend on or are depended upon specific program entities. They are particularly useful in the areas of reverse engineering, program understanding, testing and software maintenance. Most slicing methods, usually targeting either the imperative or the object oriented paradigms, are based on some sort of gra...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- IEEE Trans. Software Eng.
دوره 23 شماره
صفحات -
تاریخ انتشار 1997